home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6724 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  833 b 

  1. Path: colossus.holonet.net!shawn
  2. From: shawn@news.mdli.com (Shawn Lavin)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: fopen not working
  5. Date: 12 Feb 1996 23:01:01 GMT
  6. Organization: HoloNet National Internet Access System: 510-704-1058/modem
  7. Message-ID: <4fogrd$ku3@colossus.holonet.net>
  8. References: <4fjnj1$4q@fig.leba.net>
  9. NNTP-Posting-Host: jubal.mdli.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. So what is in the string when you want to read in a new file is :
  13.  
  14. "XXXXXmyfilename.dat\n"
  15.  
  16. The relevant thing is the newline character at the end. Your operating
  17. system is probably like most others in that a newline is not a valid
  18. part of a file name. 
  19.  
  20. Hint : fgets() leaves a newline when it is encountered before the
  21. limit of the number of characters to be read is reached.
  22.  
  23. --
  24. Shawn Lavin
  25. (shawn@mdli.com)
  26.  
  27. As always, my opinions are my own
  28.